package edu.je.prs.vo;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
import org.springframework.stereotype.Component;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * @Description:
 * @author: Anhlaidh
 * @date: 2021-04-23 13:37
 */
@Component
@Data
public class CorrelationVo implements Serializable{
    @JSONField(name = "score")
    double score;
    @Data
    public static class Point implements Serializable {
        @JSONField(name = "x")
        int x;
        @JSONField(name = "y")
        int y;

        public Point(int x, int y) {
            this.x = x;
            this.y = y;
        }
    }

    @JSONField(name = "data")
    List<Point> data;

    public CorrelationVo() {
        data = new ArrayList<>();
    }
}
